package io.sunny.platform.mcp.infrastructure.repository;

import io.sunny.platform.mcp.domain.model.Book;
import io.sunny.platform.mcp.domain.repository.BookRepository;
import io.sunny.platform.mcp.infrastructure.mapper.BookMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @Author SUNNY
 * @Date 2025/12/3 18:35
 * @PackageName: io.sunny.platform.mcp.infrastructure.repository
 * @Description: TODO
 * @Version 1.0
 */
@Component
public class BookRepositoryImpl implements BookRepository {
    @Autowired
    private BookMapper bookMapper;
    @Override
    public List<Book> findBooksByAuthor(String author) {
        return bookMapper.findBooksByAuthor(author);
    }

    @Override
    public List<Book> findBooksByCategory(String category) {
        return bookMapper.findBooksByCategory(category);
    }
}
